SEND
Section: User Commands (1)
Updated: 4 January 1986
Index
Return to Main Contents
NAME
send - send mail
SYNOPSIS
send
[address...] [-a field:body] [-b address...]
[-c address...] [-h host] [-n] [-s subject] [-t address...]
DESCRIPTION
Send
sends messages to a user-specified list of recipients.
When invoked without arguments, it prompts for
the following information:
-
To:
cc:
Subject:
The expected user responses are:
-
- 1)
-
To the "To:" and "cc:" prompts,
a list of valid user names (see below).
- 2)
-
To the "Subject:" prompt,
a brief description of the subject of the message.
Copies of the message are delivered to recipients on
the "To:" and "cc:" lists.
A response to the "To:" prompt is required, unless blind carbon
copies (bcc) are specified.
A field may be left empty by typing a carriage return <CR>.
If the user's input for any of the above fields will require
more than one line, then when typing the input the user
should precede carriage
returns with a backslash (\). In any case, the user's input for any
one of these fields must not exceed 512 characters.
Arguments
Send
may be invoked with arguments.
If they are specified, then the
contents of any resulting fields are displayed, before the
user is prompted for additional input.
Unless switches (a character preceded by a dash) are used, the
arguments are taken to be addresses for the "To:" field.
-
- -a
-
causes the next argument to be added to the header of the
message. For example, ``-a Reply-To:dcrocker''. Enclose the
argument in quotes if it contains spaces.
- -b
-
causes following arguments to be added to the "BCC:" field.
- -h
-
causes the next argument to be used as the default host reference,
for addresses not explicitly containing a hostname. When not
specified, the default is the local host.
- -c
-
causes following arguments to be added to the "cc:" field.
- -s
-
causes the next argument to be used as
the "Subject:" field's contents.
- -t
-
causes following arguments to be added to the "To:" field.
- -d
-
causes the state of the directedit
option to be changed (see "directedit" below).
Alone, "-d" disables the directedit option. "-de" causes the directedit
option to use the line editor, and "-dv" causes the directedit option
to use the visual (screen) editor.
- -n
-
prevents send from prompting for message text either directly or via
direct edit. The user is immediately given the command prompt after
entering the header data. Prompting for header data can be prevented
by giving null header arguments to send without contents. For example:
send -t "" -c "" -s "" -n
Valid User Addresses
A valid address name takes one of the following forms:
-
- 1)
-
A local Unix user's login name, such as "crocker."
- 2)
-
A name which has been designated as a local alias, such as "support."
This usually will not look any different from a login name, except
that it may be longer than the standard 8-character limit.
- 3)
-
The two-part "mailbox @ domain" address for a user on another machine.
Validation of names is done at posting time, and is performed
by the message delivery system, rather than by
send.
All addresses
are made to have a domain reference. If the user does not specify
a domain for an address, then the default host is assumed.
When the "To:", "cc:" and "Subject:" fields have been completed,
send
will prompt for the body of the message, with:
-
Type message; end with CTRL-D...
The user now enters the text of the message.
When the message is completed, or when the user wishes to insert
a file or make changes, s/he types a control-D at the beginning of a new line.
Send
then prompts the user for its next action.
User Options and Environmental Tailoring
The user may define a file in his home directory called ".sendrc". If such a
file exists,
send
will open the file and set options as specified,
otherwise the defaults will be used. Below are listed the options available
for user modification along with their default values.
- aliases
-
-
Allows the user to declare his own set of aliases for use with
send
and
resend.
Unless this file name begins with a '/',
send
will look for this file in the user's home directory.
The format for this file is:
-
aliasname user1@domain,user2@domain,user3@domain...
Note that each entry must be on a single line but each line may be
up to 511 characters long.
- checker
-
-
This will be the user's spelling checker while using send. The default
for this option is spell.
- copyfile
-
-
This is the file in which copies of messages will be stored if
requested by the user. Unless the first character of the supplied
filename is '/', the file will be created in the user's home
directory. The default for the copyfile is a file
called ".sent" in the users home directory.
See also
"file, nofile, fileonquery" below.
- directedit
-
-
If this option is specified, the
send
program will immediately enter the editor after the "To:", "cc:" and "Subject:"
fields have been supplied. The directedit option expects an argument
which specifies which editor to use. "directedit v" causes the
visual editor to be used (see "veditor" below). "directedit e" causes the
line editor to be used (see "editor" below).
- draftdir
-
-
If supplied, draft files will be created in this directory.
Otherwise, they will be created in the user's home directory.
Draftdir should be a complete path name.
- editor
-
-
This will be the user's line editor while using
send.
The default for this option is system dependent, but normally set to
ed.
If the environment variable ``EDITOR'' is set, it will be
taken as the default instead of the system default.
- file, nofile, fileonquery
-
-
The presence of one of these options allows the users to control
the keeping of file copies. ``File''
will result in a copy being kept of every
message sent by the user. ``Nofile''
will turn off the file copy
option and no copies will ever be kept. ``Fileonquery''
will cause
send
to query the user as to whether a copy should be kept or not.
- header
-
-
This option allows user-defined header lines to be added to the message being
sent. The first argument is the field name (e.g. Organization). The second
argument is the contents of the field (e.g. West Podunk College). A separate
header line will be added for each "header" command in the .sendrc file.
- paging
-
-
Having this in your .sendrc will cause your message to be displayed a screenful
at a time when using the "review message" command.
- signature, nosignature
-
-
Send
will automatically fill in the ``From:'' field with your address. The
form of the contents is either:
-
login@host or Full Name <login@host>
where ``login'' is your Unix login name, and ``host''
is the name of the Unix machine you are using. The second form is the
default on
some systems. On these systems, ``Full Name'' is derived from the system
password file. The ``nosignature''
command forces send to use the form:
-
login@host
You may personalize your messages by including a signature. If
your
.sendrc
file contains a signature line, its contents
will be used in the ``From:'' field, ahead of the address information.
The signature cannot contain any of the following characters
unless it is quoted with double quotes: `( ) < > @ , ; : " . [ ]'
and it cannot be blank.
The program will verify the signature line for correctness at startup
and will complain if your signature is illegal.
The ``From:'' field then will appear as follows:
-
signature <login@host>
- subargs
-
-
Allows the user to specify additional flags for the submit program
('v' and 'm' are always passed). Probably not for general use.
- veditor
-
-
This is the visual editor (screen editor) for use with
send.
The default for
this editor is site dependent, but is usually some
version of vi or emacs.
If the environment variable ``VISUAL'' is set, it will be
taken as the default instead of the system default.
The format for a typical
.sendrc
profile is shown below:
-
copyfile sent_mail
draftdir .drafts
signature Joe Foobar
subargs w
veditor emacs
fileonquery
aliases joes_aliases
header Organization "West Podunk College"
Commands
Send
commands must be followed by a carriage return.
Only enough of a command to make it unique need be typed.
The following are valid commands:
- ?
-
displays a list of
send's
commands.
- bcc
-
prompts for addresses for the ``BCC:'' Blind carbon copies field.
If any addresses are specified for Blind carbon copies,
they receive a slightly different message than those listed
in ``To:'' or ``cc:''. Their copy has a header component
named ``BCC:''; its
contents are the string ``(Private)''.
If the message had no ``To:'' addresses,
then the ``To:'' field will contain the string ``list:'' and there will be no
BCC field. In addition, the ``To:'' and ``cc:'' fieldnames
are modified to prevent
recipients from
automatically replying to
anyone in the ``To:'' or ``cc:'' fields.
-
NOTE: If a message has normal and BCC recipients and there is an error
with a BCC address, the normal addresses will have been processed,
and the copy of their message sent, before the BCC address error
is detected.
- bye
-
exits the
send
program.
If the user has not yet sent the message, the user is asked
to confirm the action.
A ``yes'' (or 'y') is required, followed by a <CR>, or the command will
be aborted and the user returned to the ``Command or ?:'' prompt.
- check spelling
-
will invoke the spelling checker with the draft filename as the argument
to the checker program. (See ``checker'' user option above.)
- delete body
-
permits the user to abort
send
without saving the draft body.
If send is aborted without giving the ``delete body'' command,
a copy of the draft will be kept as drft.nnnnn in the draft directory
specified by the ``draftdir'' option above.
This command can also be given at any time to erase the current draft
before inputing more text. It requires confirmation for obvious reasons.
- edit
-
will invoke the user's line editor (usually the Unix editor ed(1))
and read in the user's message body for editing.
(See ``editor'' user option above.)
- file
-
indicates the user wishes to append a file to the end of the message body.
Send
will prompt for file name.
- header edit
-
allows the user to change the contents of the header fields
(``To:'', ``cc:'', and ``Subject:''). The ``BCC:'' field is included, if not
empty.
For each header field,
send
shows the current field contents and then repeats the prompt.
The user may type in new input which will then become the contents of
that header field.
To leave the contents of the field unchanged, the user types
only a carriage return.
To delete a specific entry, the user types a minus sign followed
by the address to be deleted (e.g. ``-dcrocker@udel'').
To simply delete the first entry of a list, the
user can type a minus sign (-) followed by a carriage return.
To delete the entire line, the user types a pound sign (#) followed by
a carriage return.
To add to the field, the user types a plus sign (+), followed
by the text to be added, followed by a carriage return. For example, to
add a name to a field, one would type the command ``+user@domain''.
More than one address can be added at a time by listing several addresses
separated by commas (e.g. +u1,u2). To begin a line with one of these special
editting characters (i.e. -, +, or #), the user can precede it with a space.
- input more body
-
this command allows the user to type more text onto the end of the
message body, ending with a control-d on a new line (as before).
- post
-
same as ``send''.
- quit
-
same as ``bye''.
- review message
-
retypes message in its current form.
- send
-
posts the message to the message delivery system.
The message is delivered immediately to local users and queued for later
delivery to non-local users.
The sender is informed of the posting disposition of the message.
Each address
is listed and followed by its status, indicating that the
address is ok, or that there was a problem.
-
If all addresses are valid, the sender is then informed that the message
has successfully been posted for delivery.
If any addresses are found to be invalid, the remaining addresses are
still checked, but submission is aborted. The user
is returned to command input,
so that he may change the addresses and make them legal.
- set
-
allows the user to check the current values of option variables. If followed
by arguments, allows the user to change the current setting of variables.
The changed value lasts only for the current invocation of
send.
Option values are those listed above under ``User Options and Environmental
Tailoring''. For example, the command ``set editor ex'' would
change the ``editor'' option to ``ex'' for the duration of the current
send
session.
- vedit
-
will invoke the screen editor as specified by the ``veditor''
option and read in the user's message body, for editing.
(See ``veditor'' user option above.)
- program run
-
allows the user to give a shell command.
Send
prompts for program.
The user's response is passed to the shell.
Control is returned to
send
when the command has been executed.
- CTRL-D
-
same as ``bye''
FILES
- <login directory>/.sendrc
-
user options
- <login directory>/aliases
-
user-supplied alias file
- <login directory>/.sent
-
sent messages
- <login directory>/drft.XXXXXX
-
body of current message
SEE ALSO
v6mail(1), msg(1), resend(1), snd(1)
DIAGNOSTICS
All diagnostic messages are intended to be self explanatory.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Arguments
-
- Valid User Addresses
-
- User Options and Environmental Tailoring
-
- Commands
-
- FILES
-
- SEE ALSO
-
- DIAGNOSTICS
-
This document was created by
man2html,
using the manual pages.
Time: 06:40:21 GMT, May 19, 2025